package com.zbb.user.api;

import com.zbb.user.mapper.UserMapper;
import com.zbb.user.model.po.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class LoginController {
 @Autowired
 UserMapper userMapper;
 @RequestMapping("/login-success")
 public String loginSuccess(){
 return "登录成功";
 }
 @RequestMapping("/user/{id}")
 public User getuser(@PathVariable("id") String id){
 User xcUser = userMapper.selectById(id);
 return xcUser;
 }
 @RequestMapping("/r/r1")
 public String r1(){
 return "访问 r1 资源";
 }
 @RequestMapping("/r/r2")
 public String r2(){
 return "访问 r2 资源";
 }
}
